package struts.service;

import java.util.HashMap;
import java.util.Map;

import struts.bean.LoginBean;

public class LoginServiceImpl implements LoginService {

	public Map<String, LoginBean> getLoginMessage(String username) {
		Map<String, LoginBean> map = new HashMap<String, LoginBean>();
		LoginBean loginbean = new LoginBean();

		String url = "";
		if (username.equals("shi")) {
			loginbean.setSex("nan");
			loginbean.setUsername(username);
			url = "/view/success.jsp";
		}
		else
		{
			loginbean.setSex("nv");
			loginbean.setUsername(username);
			url = "/view/failture.jsp";
		}
		
		map.put(url, loginbean);
		
		
		return map;
	}
}
